<?php
require_once('classes/ticket.class.php');

class Airberlin{
	private $carrier = "Transavia";
	private $user ="goedkope";
	private $userKey = "dFeankEn6";
	private $baseUrl = "http://transavia.nonstopwebservices.de/v1/GetAvailabilityAndPricing";
	private $search;
	private $url;
	private $retour;
	private $tickets = array();
	
	public function Transavia($searchObj){
		$this->search = $searchObj;
		$this->retour = $this->search->getRetour();
		$this->url = $this->buildUrl();
	}
	
	public function getTickets($index){
	//	$xml = simplexml_load_file($this->url);

	
		return $this->tickets;
	}
	
	private function requestXml(){
	$xml = ' 
			<?xml version="1.0" encoding="UTF-8"?>
		<AirShoppingRequest xmlns="http://ws.orbitz.com/schemas/2008/Air">
			<PointOfSale>EBUK</PointOfSale>
			<Travelers>
				<Adults>1</Adults>
			</Travelers>
			<Slices preferNonStop="false" refundableOnly="false">
				<CabinType code="C"/>
				<Slice>
					<Departure>
						<Airport code="LHR"/>
						<Date>2012-11-09</Date>
					</Departure>
					<Arrival>
						<Airport code="CDG"/>
					</Arrival>
				</Slice>
				<Slice>
					<Departure>
						<Airport code="CDG"/>
						<Date>2012-11-19</Date>
					</Departure>
					<Arrival>
						<Airport code="LHR"/>
					</Arrival>
				</Slice>
			</Slices>
		</AirShoppingRequest>';

	}
	private function buildUrl(){
		
	}
}